<!-- $Id: goods_search.htm 16790 2009-11-10 08:56:15Z wangleisvn $ -->
<div class="form-div">
  <form action="javascript:searchGoods()" name="searchForm">
    <img src="images/icon_search.gif" width="26" height="22" border="0" alt="SEARCH" />
    {if $smarty.get.act neq "trash"}
    <!-- 分类 -->
    地区
    <!-- 办事处 -->
    <select name="area_id"><option value=''>{$lang.intro_type}</option>
    {foreach from=$agency_list item=agency}
        <option value="{$agency.agency_id}">{$agency.agency_name}</option>
    {/foreach}
    </select>
    {/if}
    <!-- 关键字 -->
    {$lang.keyword} <input type="text" name="keyword" size="15" />
    {if $smarty.get.act eq "buy_stats" || $smarty.get.act eq "out_stats" }
    <input type="date" name="start_date" class="data" value="{$time_start}">
    <input type="date" name="end_date" class="data" value="{$time_end}">
    {/if}
    <input type="submit" value="{$lang.button_search}" class="button" />
  </form>
</div>

{literal}
<script language="JavaScript">
    function searchGoods()
    {
{/literal}
        {if $smarty.get.act eq "buy_stats" || $smarty.get.act eq "out_stats"}
        listTable.filter['start_date'] = document.forms['searchForm'].elements['start_date'].value;
        listTable.filter['end_date'] = document.forms['searchForm'].elements['end_date'].value;
        {/if}
{literal}
        listTable.filter['keyword'] = Utils.trim(document.forms['searchForm'].elements['keyword'].value);
        listTable.filter['area_id'] = Utils.trim(document.forms['searchForm'].elements['area_id'].value);
        listTable.filter['page'] = 1;
        listTable.loadList();
    }
</script>
{/literal}